package com.kapcb.assemble.base;

/**
 * <a>Title: HandlerInterceptor </a>
 * <a>Author: cb <a>
 * <a>Description: 自定义拦截器 <a>
 *
 * @author cb
 * @version 1.0
 * @date 2024/4/18 5:30 PM
 * @since 1.0
 */
public interface HandlerInterceptor<T extends Request, R extends Response> {

    /**
     * 拦截器前置处理
     *
     * @param request
     * @param response
     */
    default void preHandle(T request, R response) {

    }

    /**
     * 拦截器后置处理
     *
     * @param request
     * @param response
     */
    default void postHandle(T request, R response) {

    }

    /**
     * 拦截器处理完成后回调处理
     *
     * @param request
     * @param response
     */
    default void afterCompletion(T request, R response) {

    }

}
